<?php if($ad->getLengthUsed() > 0):  ?>
<?php 
if($ad->getIsBuying() > 0) { echo ucfirst($txt->getWord('max')); }
if(($ad->getTypeId() == 2) || ($ad->getAdTypeObject() == 'AdVehicleLight'))
{ echo ucfirst($txt->getWord('mileage')); }
else
{ echo ucfirst($txt->getWord('work_hours')); }
?><br />
<span class="value"><?php echo number_format($ad->getLengthUsed(), 0, ',', ' '); ?></span>
<?php endif; ?>